<script setup lang="ts">
const keywords = defineModel()
const emits = defineEmits(['search'])
// 关键字搜索数据
const onSearch = () => {
  emits('search', 'search')
}

const onReset = () => {
  emits('search', 'reset')
}
</script>

<template>
  <el-card>
    <el-form inline class="form">
      <el-form-item label="用户名："
        ><el-input
          placeholder="请你输入搜索用户名"
          v-model="keywords"
        ></el-input
      ></el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSearch">搜索</el-button>
        <el-button type="primary" @click="onReset">重置</el-button>
      </el-form-item>
    </el-form>
  </el-card>
</template>

<style lang="scss" scoped>
.form {
  height: 50px;
  display: flex;
  justify-content: space-between;
}
</style>
